<template>
  <div class="section">
    <div class="aside">
      <div class="aside-body">
        <div class="aside-tab">
          <div class="aside-panel">
            <div class="aside-nav">
              <side-menu
                :menu="menu"
              ></side-menu>
            </div>
          </div>
          <div class="aside-nav aside-footer">
            <side-menu
                :menu="menu"
                :system="true"
              ></side-menu>
          </div>
        </div>
      </div>
    </div>
    <global-header />
    <div class="primary">
      <router-view />
    </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import GlobalHeader from './GlobalHeader'
import SideMenu from '@/components/SideMenu'

export default {
  name: 'BasicLayout',
  components: {
    GlobalHeader,
    SideMenu
  },
  data() {
    return {
      menus: []
    }
  },
  computed: {
    ...mapGetters([
      'routes'
    ])
  },
  created() {
    this.menu = this.routes.find(item => item.path === '/').children
  }
};
</script>

<style lang="less"></style>
